package com.dingreading.cloud.soms.service;

import com.dingreading.cloud.common.util.PageUtil;
import com.dingreading.cloud.soms.entity.BorrowBook;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import java.util.Date;

/**
 * 服务层。
 *
 * @author Administrator
 * @since 2023-11-22
 */
public interface BorrowBookService extends IService<BorrowBook> {

    Page<BorrowBook> pageList(PageUtil pageUtil, String storeUid, String keyword, Integer returnStatus,
                              String beginTime, String endTime, Integer searchType);

    BorrowBook getByStoreUidAndId(String storeUid, Long id);

    int saveRemark(String storeUid, Long id, String returnRemark);

    int setReturn(String storeUid, Long id, Integer returnNum, Integer borrowNum, Date time);

    // 获取会员借阅中的记录数量
    long getBorrowingCnt(String storeUid, String memberUid);
}
